package com.zhupanlin.zhyl.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhupanlin.zhyl.model.order.OrderInfo;
import com.zhupanlin.zhyl.model.order.PaymentInfo;

import java.util.Map;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/12/8 15:37
 */
public interface PaymentService extends IService<PaymentInfo> {
    /**
     * 向支付记录表中添加信息
     * @param orderInfo
     * @param paymentType
     */
    void savePaymentInfo(OrderInfo orderInfo, Integer paymentType);

    /**
     * 更新订单状态
     * @param outTradeNo
     * @param map
     */
    void paySuccess(String outTradeNo, Map<String, String> map);

    /**
     * 获取支付记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);
}
